
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>注册</title>
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="zsCat,layui,前端社区">
<meta name="description"
	content="zsCat社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
<link rel="stylesheet"
	href="${ctxPath!}/static/blog/shequ/layui/css/layui.css">
<link rel="stylesheet"
	href="${ctxPath!}/static/blog/shequ/css/global.css">
</head>
<body>

	@layout("/blog/community/layout/SheQuHeader.html"){}

	<div class="main layui-clear">
		<h2 class="page-title">注册</h2>
		<div class="layui-form layui-form-pane">
			<form id="reg-form" action="${ctxPath}/front/blog/reg" method="post">
				<div class="layui-form-item">
					<label for="L_email" class="layui-form-label">邮箱</label>
					<div class="layui-input-inline">
						<input type="text" id="L_email" name="username" required
							lay-verify="email" autocomplete="off" class="layui-input" data-error="注册失败">
					</div>
					<div class="layui-form-mid layui-word-aux">将会成为您唯一的登入名</div>
				</div>
				<div class="layui-form-item">
					<label for="L_username" class="layui-form-label">昵称</label>
					<div class="layui-input-inline">
						<input type="text" id="L_username" name="nickname" required
							lay-verify="required" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label for="L_pass" class="layui-form-label">密码</label>
					<div class="layui-input-inline">
						<input type="password" id="L_pass" name="password" required
							lay-verify="required" autocomplete="off" class="layui-input">
					</div>
					<div class="layui-form-mid layui-word-aux">6到16个字符</div>
				</div>
				<div class="layui-form-item">
					<label for="L_repass" class="layui-form-label">确认密码</label>
					<div class="layui-input-inline">
						<input type="password" id="L_repass" name="passwordRepeat" required
							lay-verify="required" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label for="L_vercode" class="layui-form-label">人类验证</label>
					<div class="layui-input-inline">
						<input type="text" id="L_vercode" name="vercode" required
							lay-verify="required" placeholder="请回答后面的问题" autocomplete="off"
							class="layui-input">
					</div>
					<div class="layui-form-mid">
						<span style="color: #c00;">3711111</span>
					</div>
				</div>
				<div class="layui-form-item">
					<button class="layui-btn" lay-filter="*" id="reg-btn" name="reg-btn" type="submit">立即注册</button>
				</div>
				<div class="layui-form-item zsCat-form-app">
					<span>或者直接使用社交账号快捷注册</span> <a href=""
						onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})"
						class="iconfont icon-qq" title="QQ登入"></a> <a href=""
						onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})"
						class="iconfont icon-weibo" title="微博登入"></a>
				</div>
			</form>
		</div>
	</div>

	<div class="footer">
		<p>
			<a href="http://zsCat.layui.com/">zsCat社区</a> 2016 &copy; <a
				href="http://www.layui.com/">layui.com</a>
		</p>
		<p>
			<a href="http://zsCat.layui.com/auth/get" target="_blank">产品授权</a> <a
				href="http://zsCat.layui.com/jie/3147.html" target="_blank">VIP说明</a>
			<a href="http://www.layui.com/" target="_blank">商务合作</a> <a
				href="http://weibo.com/SentsinXu" target="_blank" rel="nofollow">微博</a>
			<a href="http://zsCat.layui.com/jie/2461.html" target="_blank">微信公众号</a>
		</p>
	</div>
	<script src="{ctxPath!}/static/blog/shequ/layui/layui.js"></script>
	<script>
layui.cache.page = 'user';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '${ctxPath!}/static/blog/shequ/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "1.0.0"
  ,base: '${ctxPath!}/static/blog/shequ/mods/'
}).extend({
  zsCat: 'index'
}).use('zsCat');
</script>

<!--[if !IE]> -->
		<script src="${ctxPath!}/static/jquery/jquery-2.1.1.min.js"></script>
		<!-- <![endif]-->

		<!--[if IE]>
		<script src="${ctxPath!}/static/jquery/jquery-1.11.1.min.js"></script>
		<![endif]-->

		<!--[if !IE]> -->
		<script type="text/javascript">
			window.jQuery || document.write("<script src='${ctxPath!}/static/jquery/jquery.min.js'>"+"<"+"/script>");
		</script>
		<!-- <![endif]-->
		
<script type="text/javascript" src="${ctxPath!}/static/layer/layer.min.js"></script>
		<script type="text/javascript" src="${ctxPath}/static/validate/Validform_v5.3.2_min.js"></script>

			<script>
				
			jQuery(function($) {
				$("#reg-form").Validform({
					btnSubmit:"#reg-btn",
					ajaxPost:true,
					beforeSubmit:function(curform){
						$("#reg-btn").attr("disabled","disabled").find("span").text("注册中…");
					},
					callback:function(data){

						if(undefined != data.error){
							$("#reg-btn").removeAttr("disabled").find("span").text("登 录");
							var obj = $("#reg-form input[data-error='"+data.error+"']");
							layer.tips(data.error,obj, {
								guide:0,
								time: 4,
								style : ['background-color:#F26C4F; color:#fff','#F26C4F' ],
							});
						}else{
							window.location.href = "${ctxPath!}/front/blog/indexs";
						}
					},
					tiptype : function(msg, o, cssctl) {
						if (!o.obj.is("form")) {
							if (o.type != 2) {
								layer.tips(msg, o.obj, {
									guide:3,
									time: 4,
									style : ['background-color:#F26C4F; color:#fff','#F26C4F' ],
								});
							}
						}
					},
					tipSweep : true
				});
				
				$("#reg-form").keydown(function(e){
					 var e = e || event,
					 keycode = e.which || e.keyCode;
					 if (keycode==13) {
					  $("#reg-btn").trigger("click");
					 }
				});
				
			});
		</script>
</body>
</html>